home *** CD-ROM | disk | FTP | other *** search
/ Amiga Mag HDD Backup / Amiga Mag HDD Backup.zip / Amiga Mag HDD Backup / Alexander.img.bin / Alexander.img / ***9.11 All NEWer important / 10.2 / Finch⁄Front Ending C / CanDoMJC.h < prev    next >
Text File  |  1983-05-04  |  1KB  |  53 lines

  1. /*------------ INCLUDE FILES ----------------*/
  2.  
  3. #include <proto/exec.h>
  4. #include <proto/intuition.h>
  5. #include <proto/graphics.h>
  6. #include <string.h>
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include <math.h>
  10. #include <float.h>
  11.  
  12. /*---------- DEFINES ------------*/
  13.  
  14. #define MANDELBROT  0
  15. #define JULIA        1
  16.  
  17. /*---------- Structure Pointer Declarations ----------*/
  18.  
  19. struct IntuitionBase *IntuitionBase;
  20. struct GfxBase *GfxBase;
  21.  
  22. /*---------- Structure Definitions -----------*/
  23.  
  24. struct complex {
  25.    DOUBLE r;
  26.    DOUBLE i;
  27. };
  28.  
  29. struct ComplexRange {
  30.    DOUBLE rmin, rmax;
  31.    DOUBLE imin, imax;
  32. };
  33.  
  34. /*------------------ GENERAL FUNCTIONS -----------------*/
  35.  
  36. LONG OpenLibraries(void)
  37. {
  38.    IntuitionBase = (struct IntuitionBase *) OpenLibrary("intuition.library",33);
  39.    if(!IntuitionBase) return FALSE;
  40.  
  41.    GfxBase = (struct GfxBase *) OpenLibrary("graphics.library",33);
  42.    if(!GfxBase) return FALSE;
  43.  
  44.    return TRUE;
  45. }   /* OpenLibraries */
  46.  
  47.  
  48. void CloseLibraries (void)
  49. {
  50.    if (IntuitionBase) CloseLibrary((struct Library *)IntuitionBase);
  51.    if (GfxBase) CloseLibrary((struct Library *)GfxBase);
  52. } /* CloseLibraries () */
  53.